﻿Public Class FriendshipRequest
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        SqlDataSource2.SelectCommand = "SELECT [F_ID], [FromUserName], [ToUserName], [RequestApproved] " & _
                                        "FROM [TBL_Friend_Request] WHERE " & _
                                        " ( [FromUserName] like """ & User.Identity.Name & """ )"

        GridView2.DataBind()
    End Sub

    Protected Sub SqlDataSource1_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles SqlDataSource1.Selecting
        e.Command.Parameters(0).Value = User.Identity.Name
    End Sub
End Class